<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>编辑邮件</title>
<link href="/widget/bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet"  type="text/css"/>
 {cssjs}
<link href="/res/css/inside_page.css" rel="stylesheet"  type="text/css"/>
<style>
	#attachment_box .attachment_one{display: inline-block;margin-right: 5px;color: #6C9EC0;}
	#attachment_box .attachment_one_del{display: inline-block;margin-right: 15px;color: #c00;}
	.layui-upload-button{float: left;width: 150px;}
	#attachment_box{float: left;width: 78%;margin-left: 20px;}
</style>
</head>
<body>
<div class="container-fluid larry-wrapper">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
            <section class="panel">
            	<form id="form1" class="layui-form layui-form-pane" method="post" data-dotype="a" action="/html/email/srv/edit_email.php">
                
            	<div class="layui-form-item">
                    <label class="layui-form-label">主&nbsp;&nbsp;&nbsp;题：</label>
                    <div class="layui-input-block">
                        <input name="subject" id="subject" value="{subject}" class="layui-input" type="text" autocomplete="off">
                    </div>
                </div>
			    <div class="layui-form-item">
                    <label class="layui-form-label">收件人：</label>
                    <div class="layui-input-block">
                        <input id="acceptname" value="" class="layui-input" type="text" autocomplete="off" style="display: inline-block;width: 85%;">
                        <input name="receiver" id="accept_id" value="" type="text" style="display: none;">
                        <a class="layui-btn" id="receiver_select" style="display: inline-block;">选择</a>
                    </div>
                </div>
			    <div class="layui-form-item">
                    <label class="layui-form-label">附&nbsp;&nbsp;&nbsp;件：</label>
                    <div class="layui-input-block">
                        <input type="file" id="upload_attachment" name="upload_attachment[]" multiple="true" lay-type="file" class="layui-upload-file"> 
                        <div id="attachment_box">
                        	{attachment_html}
                        </div>
                        <input name="attachment" id="attachment" value='{attachment_arr}' type="text" style="display: none;">
                    </div>
                </div>
                
				<textarea class="layui-textarea" name="content" id="content" style="display: none">
					{content}
				</textarea>
				<div class="layui-form-item"></div>
				<div class="layui-form-item col-md-5" pane>
                    <label class="layui-form-label">提醒方式</label>
                    <div class="layui-input-block">
                         <input type="radio" name="sms_flag" id="sms_flag" title="系统提醒" value="0" checked="checked" />
                         <input type="radio" name="sms_flag" id="sms_flag" title="手机短信提醒" value="1" />
                    </div>
                </div>
				<div class="layui-form-item col-md-5" pane>
                    <label class="layui-form-label">重要程度</label>
                    <div class="layui-input-block">
                         <input type="radio" name="important" id="important" title="一般" value="0" checked="checked" />
                         <input type="radio" name="important" id="important" title="重要" value="1" />
                         <input type="radio" name="important" id="important" title="非常重要" value="1" />
                    </div>
                </div>
                <div class="layui-form-item"></div>
				</form>
				<div style="position: fixed;bottom:0;background: #F1F1F1;width: 100%;padding: 5px;">
					<button id="btn_save" class="layui-btn layui-btn-small">立即发送</button>
				</div>
				
            </section>
        </div>
    </div>
</div>
    {jsmodel}
   <script type="text/javascript">
        layui.use('email_edit');
        $("#subject").focus();
        $("#receiver_select").click(function(){
        	var index = parent.layer.getFrameIndex(window.name);//获取当前弹出层的ID
        	var userid=$("#accept_id").val();
	    	parent.layer.open({
	            type: 2,
	            title: '选择收件人',
	            shadeClose: false,
	            shade: 0.8,
	            area: ['100%', '100%'],
	            full:true,
	            content: './?t=select_accept&fid='+index+'&userid='+userid //iframe的url
	        }); 
	    })
    </script>
</body>
</html>